<template>
    <div class="footer pdTop pdBot">
        <b-container>
            <b-row>
                <b-col xl="2" lg="2" md="2" sm="4" class="footer-about">
                    <div class="type">{{$t('footer.about.title')}}</div>
                </b-col>
                <b-col xl="4" lg="4" md="4" sm="8" class="footer-contact">
                    <div class="type">{{$t('footer.contact.title')}}</div>
                    <div class="list">
                        <div v-for="(item,index) in $t('footer.contact.lists')" :key="index"> > {{item}}</div>
                    </div>
                </b-col>
                <b-col xl="6" lg="6" md="6" sm="12">
                    <div class="type">{{$t('footer.follow.title')}}</div>
                    <b-row>
                        <b-col xl="2" lg="2" md="2" sm="2" v-for="(item,index) in $t('footer.follow.lists')" :key="index" class="icon-list">
                            <a target="_blank" :href="item.href" class="icon-img" :style="{ background: 'url(' + require('./images/'+ item.img ) + ') no-repeat 0 0', backgroundSize: '100% 100%'}">
                            </a>
                            <div class="icon-code-wechat" v-if="index==5"><img src="./images/wechat.png"></div>
                        </b-col>
                    </b-row>
                </b-col>
            </b-row>
        </b-container>
    </div>
</template>

<script>
export default {
    methods:{
        toHref(){
            console.log('跳转到加入我们')
        }
    }
}
</script>


<style lang="scss" scoped>
.footer{
    background: #061a39;
    color: #fff;
    .type {
        font-size: 16px;
        margin-bottom: 20px;
    }
    .list{
        &>div{
            margin-bottom: 15px;
        }
    }
    .icon-list{
        max-width:20%;
        flex:20%;
        text-align: center;
        position: relative;
        .icon-img{
            display: inline-block;
            width: 44px;
            height: 44px;
            margin-bottom: 20px;
            cursor: pointer;
        }
        .icon-code-wechat{
            position: absolute;
            top: -125px;
            left: 50%;
            transform: translateX(-50%);
            display: none;
        }
        &:nth-child(1){
            .icon-img:hover{
                background: url(./images/footer-twitter-hover.png) no-repeat 0 0 !important;
                background-size: 100% 100%;
            }
        }
        &:nth-child(2){
            .icon-img:hover{
                background: url(./images/footer-facebook-hover.png) no-repeat 0 0 !important;
                background-size: 100% 100%;
            }
        }
        &:nth-child(3){
            .icon-img:hover{
                background: url(./images/footer-reddit-hover.png) no-repeat 0 0 !important;
                background-size: 100% 100%;
            }
        }
        &:nth-child(4){
            .icon-img:hover{
                background: url(./images/footer-medium-hover.png) no-repeat 0 0 !important;
                background-size: 100% 100%;
            }
        }
        &:nth-child(5){
            .icon-img:hover{
                background: url(./images/footer-telegram-hover.png) no-repeat 0 0 !important;
                background-size: 100% 100%;
            }
        }
        &:nth-child(6){
            .icon-img:hover{
                background: url(./images/footer-wechat-hover.png) no-repeat 0 0 !important;
                background-size: 100% 100%;
            }
            &:hover{
                .icon-code-wechat{
                    display: block;
                }
            }
        }
        &:nth-child(7){
            .icon-img:hover{
                background: url(./images/footer-github-hover.png) no-repeat 0 0 !important;
                background-size: 100% 100%;
            }
        }
        &:nth-child(8){
            .icon-img:hover{
                background: url(./images/footer-weibo-hover.png) no-repeat 0 0 !important;
                background-size: 100% 100%;
            }
        }
        &:nth-child(9){
            .icon-img:hover{
                background: url(./images/footer-youtube-hover.png) no-repeat 0 0 !important;
                background-size: 100% 100%;
            }
        }
        &:nth-child(10){
            .icon-img:hover{
                background: url(./images/footer-vqq-hover.png) no-repeat 0 0 !important;
                background-size: 100% 100%;
            }
        }
    }
}
</style>
